package com.sa.oauth.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;



@Data
@Accessors(chain = true)
@Schema(description = "系统人员账号信息")
@TableName("YTH_SYS_PERSON")
public class SysPerson extends BaseEntity {

    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "主键")
    @TableField("ID")
    private Long id;

    @Schema(description = "人员名称")
    @TableField("PERSON_NAME")
    private String personName;

    @Schema(description = "组织编号")
    @TableField("ORG_CODE")
    private String orgCode;

    @Schema(description = "账号")
    @TableField("ACCOUNT")
    private String account;

    @Schema(description = "密码")
    @TableField("PASSWORD")
    private String password;

    @Schema(description = "邮箱")
    @TableField("EMAIL")
    private String email;

    @Schema(description = "证书序列号")
    @TableField("SERIAL_NUMBER")
    private String serialNumber;

    @Schema(description = "状态")
    @TableField("STATUS")
    private Integer status;

    @Schema(description = "区号")
    @TableField("AREANO")
    private String areaNo;

    @Schema(description = "固定电话")
    @TableField("PHONENO")
    private String phoneNo;

    @Schema(description = "移动电话")
    @TableField("CELLNO")
    private String cellNo;

    @Schema(description = "乐观锁")
    @TableField("REVISION")
    private String revision;

    @Schema(description = "是否首次登陆 1-首次登陆 0-非首次登陆")
    @TableField("FIRST_LOGIN")
    private Integer firstLogin;

    @Schema(description = "uuid")
    @TableField("UUID")
    private String uuid;

    @Schema(description = "头像")
    @TableField("PROFILE")
    private String profile;

    @Schema(description ="信安世纪注册码-如果存在为code值 不存在不需要注册")
    @TableField("CODE")
    private String code;

    @Schema(description ="信安世纪PIN码")
    @TableField("PIN")
    private String pin;

    @Schema(description ="修改密码校验时间")
    @TableField("UPDATE_PASS_VALID_TIME")
    private Long updatePassValidTime;

    @Schema(description ="信安世纪uid")
    @TableField("UID")
    private String uid;

    @Schema(description ="信安世纪解锁码")
    @TableField("UNLOCK_CODE")
    private String unlockCode;

    @Schema(description = "密码是否加密 1-加密 0-未加密")
    @TableField("IS_ENCRYPTED")
    private Integer isEncrypted;

    @Schema(description ="openid")
    @TableField("OPEN_ID")
    private String openid;

}
